package org.example.rpc.test;

import org.example.HelloService;
import org.example.rpc.core.netty.server.NettyServer;
import org.example.rpc.core.registry.DefaultServiceRegistry;
import org.example.rpc.core.serializer.KryoSerializer;
import org.example.rpc.core.socket.server.ServiceRegistry;

public class NettyTestServer {
    public static void main(String[] args) {
        HelloService helloService = new HelloServiceImpl();
        ServiceRegistry registry = new DefaultServiceRegistry();
        registry.register(helloService);
        NettyServer server = new NettyServer();
        server.setSerializer(new KryoSerializer());
        server.start(8888);
    }
}
